package com.xixibaby.core;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Getter
@Setter
public class SuperPO {

    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by",fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(value = "update_by",fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic //逻辑删除字段  使用逻辑删除必须加上这个注解
    private Integer deleted;

    @TableField(value = "version",fill = FieldFill.INSERT)
    @Version  //版本字段 乐观锁插件必须加上这个注解
    private Integer version;
}
